package com.lifa.controller;

import com.lifa.dao.ChanpinLeixingDao;
import com.lifa.entity.ShangpinFenlei;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/chan")
@Scope("prototype")
public class ChanpinLeixingController {
    /**
     * 123
     */
    @Autowired
    private ChanpinLeixingDao chanpinLeixingDao;
    @RequestMapping("/chanpin")
    @ResponseBody
    public List<ShangpinFenlei> list(){
        return chanpinLeixingDao.query();
    }
}
